Crate fltk_egui[][src]

Expand description

fltk-egui

An FLTK backend for Egui using a GlWindow. The code is largely based on https://github.com/ArjunNair/egui_sdl2_gl modified for fltk-rs.

Usage

Add to your Cargo.toml:

[dependencies]
fltk-egui = "0.3"

The basic premise is that egui is an immediate mode gui, while FLTK is retained. To be able to run Egui code, events and redrawing would need to be handled/done in the FLTK event loop. The events are those of the GlWindow, which are sent to egui’s event handlers. Other FLTK widgets can function also normally since there is no interference from Egui.

Examples

To run the examples, just run:

$ cargo run --example demo_windows
$ cargo run --example triangle
$ cargo run --example basic
$ cargo run --example embedded

Re-exports

pub use egui;
pub use epi;
pub use fltk;
pub use gl;

Structs

Shuttles FLTK’s input and events to Egui

The default cursor

Peforms egui’s painting in the GlutWindow

Repaint signal for epi frame.

Enums

The scaling factors of the app

Traits

Functions

Frame time for FPS.

Time of day as seconds since midnight. Used for clock in demo app.

Handles input/events from FLTK

Translates FLTK cursor to Egui cursors

Translates key codes

Construct the backend. Requires the DpiScaling, which can be Default or Custom(f32)